<template>
  <div class="wrap">
    <a-button type="link" @click="handClick">全部</a-button>
    <a-modal v-model="visible" :title="title" :footer="null" width="60vw">
      <div class="modalContent">
        <ManageEchart
          :type="item.type"
          :setting="item.setting || {}"
          :data="formatChartData()"
          style="height: 100%; width: 100%"
        >
        </ManageEchart>
      </div>
    </a-modal>
  </div>
</template>
<script>
import ManageEchart from "@/components/ManageEchart/ManageEchart";
export default {
  name: "ShowModalList",
  components: {
    ManageEchart,
  },
  props: {
    list: {
      type: [Array, Object],
      default: [],
    },
    title: {
      type: String,
      default: "",
    },
    item: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      visible: false,
      order: "desc",
    };
  },
  methods: {
    handClick() {
      this.visible = true;
    },
    formatChartData() {
      let data = this.item.data;
      return data;
    },
  },
};
</script>
<style lang="less" scoped>
.wrap {
  .modalContent {
    height: 70vh;
  }
}
::v-deep {
  .ant-modal-body {
    padding: 0px;
  }
}
</style>
